<!DOCTYPE html>
<html lang="en">
<head>
	<meta charset="UTF-8">
	<title>207-量词.html</title>
</head>
<body>
	
</body>
<script>
	var str = "qwer 345 tyui 908 iop 23 u 1";

	var reg = /\d\d\d/g;
	var reg1= /\d{3}/g;
	var reg2 = /\d{1,}/g;
	var reg3 = /\d{2,3}/g;
	var reg4 = /\d+/g;
	var reg5 = /\d?/g;
	var reg6 = /\d*/g;

	console.log(str);
	console.log(str.replace(reg,"*"));
	console.log(str.replace(reg1,"*"));
	console.log(str.replace(reg2,"*"));
	console.log(str.replace(reg3,"*"));
	console.log(str.replace(reg4,"*"));
	console.log(str.replace(reg5,"*"));
	console.log(str.replace(reg6,"*"));
</script>
</html>